package com.huluobo.a2203kotlinjetpackdemo.lifeCycle

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.View
import androidx.lifecycle.ViewModelProvider

class FragmentB : Fragment() {
    lateinit var shareViewModel: ShareViewModel

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        shareViewModel = ViewModelProvider(requireActivity())[ShareViewModel::class.java]
        shareViewModel.getCurrentPage()
    }
}